Problem: Mary wants to buy one large pizza, one medium pizza, and three drinks. The drinks cost $p$ dollars each, the medium pizza costs two times as much as one drink, and the large pizza costs three times as much as one drink. If Mary started with $30$ dollars, how much money would she have left after making all of her purchases?  Give your answer as an expression of $p$.
Answer: Let's first look at how much total money Mary spent. Since drinks cost $p$ dollars, and she bought $3$ of them, she spent $3p$ dollars on drinks. One drink costs $p$ dollars, so a medium pizza costs $2p$ dollars and a large pizza costs $3p$ dollars. Therefore, in total, Mary spent \[3p+2p+3p=8p\] dollars.

Now, Mary had $30$ dollars to begin with, and she spent $8p$ dollars, so she has \[\boxed{30-8p}\] dollars left.